let dicDataState = [
  {
    label: "有效",
    value: 0,
  },
  {
    label: "失效",
    value: 1,
  },
  {
    label: "即将到期",
    value: 2,
  },
];
let dicDataType = [
  {
    label: "机关书屋",
    value: 0,
  },
  {
    label: "社区书屋",
    value: 1,
  },
  {
    label: "学校书屋",
    value: 2,
  },
  {
    label: "企业书屋",
    value: 3,
  },
  {
    label: "其他",
    value: 4,
  },
];

export const tableOption = {
  dialogDrag: true,
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  selection: true,
  menuAlign: "center",
  align: "center",
  editBtn: true,
  delBtn: false,
  addBtn: true,
  viewBtn: true,
  searchShow: false,
  menuWidth: 150,
  menuType: "text",
  searchMenuSpan: 6,
  defaultSort: {},
  column: [
    {
      label: "书屋名称",
      prop: "name",
      rules: [
        {
          required: true,
          message: "请输入书屋名称",
          trigger: "blur",
        },
      ],
    },
    {
      label: "所在地区",
      prop: "areaList",
      dataType: "array",
      slot: true,
      formslot: true,
      rules: [
        {
          required: true,
          message: "请选择所在地区",
          trigger: "blur",
        },
      ],
    },
    {
      label: "简介",
      prop: "briefIntroduction",
      type: "textarea",
      span: 24,
    },

    {
      label: "书屋类型",
      prop: "type",
      dataType: "number",
      type: "radio",
      dicData: dicDataType,
      span: 24,
      rules: [
        {
          required: true,
          message: "请选择书屋类型",
          trigger: "blur",
        },
      ],
    },
    {
      label: "其他备注",
      prop: "typeOther",
      addDisplay: false,
      editDisplay: false,
      span: 24,
    },
    {
      label: "详细地址",
      prop: "detailedAddress",
      rules: [
        {
          required: true,
          message: "请输入详细地址",
          trigger: "blur",
        },
      ],
    },
    {
      label: "服务机构",
      prop: "serviceOrganization",
      slot: true,
      formslot: true,
      rules: [
        {
          required: true,
          message: "请选择服务机构",
          trigger: "blur",
        },
      ],
    },
    {
      label: "联系人",
      prop: "contacts",
      rules: [
        {
          required: true,
          message: "请输入联系人",
          trigger: "blur",
        },
      ],
    },

    {
      label: "联系电话",
      prop: "contactPhone",
      rules: [
        {
          required: true,
          message: "请输入联系电话",
          trigger: "blur",
        },
      ],
    },
    {
      label: "建成时间",
      prop: "completedTime",
      type: "date",
      valueFormat: "yyyy-MM-dd",
      rules: [
        {
          required: true,
          message: "请选择建成时间",
          trigger: "blur",
        },
      ],
    },

    {
      label: "建设单位",
      prop: "company",
      rules: [
        {
          required: true,
          message: "请输入建设单位",
          trigger: "blur",
        },
      ],
    },
    {
      label: "面积",
      prop: "area",
    },
    {
      label: "坐标",
      prop: "lonlat",
      slot: true,
      formslot: true,
      span: 12,
      rules: [
        {
          required: true,
          message: "请选择坐标",
          trigger: "blur",
        },
      ],
    },
    {
      label: "状态",
      prop: "state",
      dicData: dicDataState,
      slot: true,
      formslot: true,
      addDisplay: false,
      editDisplay: false,
    },

    {
      label: "备注",
      prop: "remarks",
      type: "textarea",
      span: 24,
    },
    {
      label: "合同期限",
      prop: "contractValidity",
      dataType: "array",
      slot: true,
      formslot: true,
      span: 24,
      rules: [
        {
          required: true,
          message: "请选择合同期限",
          trigger: "blur",
        },
      ],
    },
    {
      label: "首页图片",
      prop: "homePicture",
      slot: true,
      formslot: true,
      span: 24,
    },
    {
      label: "详情图片",
      prop: "detailPicture",
      slot: true,
      formslot: true,
      span: 24,
    },
  ],
};
